import { Subject } from 'rxjs';

/**
 * 主编辑表单
 *
 * @export
 * @class MainData
 */
export class MainData {

    /**
     * 忽略属性值变化
     *
     * @type {boolean}
     * @memberof MainData
     */
    public ignorefieldvaluechange: boolean = false;

    /**
     * 属性值变化
     *
     * @type {Subject<any>}
     * @memberof MainData
     */
    public fieldValueChange: Subject<any> = new Subject();

    /**
     * 更新时间
     *
     * @private
     * @type {*}
     * @memberof MainData
     */
    private _srfupdatedate: any = null;

    /**
     * 设置srfupdatedate值
     *
     * @memberof MainData
     */
    set srfupdatedate(val: any) {
        const oldVal = this._srfupdatedate;
        this._srfupdatedate = val;
        if (!Object.is(oldVal, val) && !this.ignorefieldvaluechange) {
            this.fieldValueChange.next({ name: 'srfupdatedate', value: val });
        }
    }

    /**
     * 获取srfupdatedate值
     *
     * @type {*}
     * @memberof MainData
     */
    get srfupdatedate(): any {
        return this._srfupdatedate;
    }

    /**
     * 
     *
     * @private
     * @type {*}
     * @memberof MainData
     */
    private _srforikey: any = null;

    /**
     * 设置srforikey值
     *
     * @memberof MainData
     */
    set srforikey(val: any) {
        const oldVal = this._srforikey;
        this._srforikey = val;
        if (!Object.is(oldVal, val) && !this.ignorefieldvaluechange) {
            this.fieldValueChange.next({ name: 'srforikey', value: val });
        }
    }

    /**
     * 获取srforikey值
     *
     * @type {*}
     * @memberof MainData
     */
    get srforikey(): any {
        return this._srforikey;
    }

    /**
     * 用户角色成员标识
     *
     * @private
     * @type {*}
     * @memberof MainData
     */
    private _srfkey: any = null;

    /**
     * 设置srfkey值
     *
     * @memberof MainData
     */
    set srfkey(val: any) {
        const oldVal = this._srfkey;
        this._srfkey = val;
        if (!Object.is(oldVal, val) && !this.ignorefieldvaluechange) {
            this.fieldValueChange.next({ name: 'srfkey', value: val });
        }
    }

    /**
     * 获取srfkey值
     *
     * @type {*}
     * @memberof MainData
     */
    get srfkey(): any {
        return this._srfkey;
    }

    /**
     * 用户角色成员名称
     *
     * @private
     * @type {*}
     * @memberof MainData
     */
    private _srfmajortext: any = null;

    /**
     * 设置srfmajortext值
     *
     * @memberof MainData
     */
    set srfmajortext(val: any) {
        const oldVal = this._srfmajortext;
        this._srfmajortext = val;
        if (!Object.is(oldVal, val) && !this.ignorefieldvaluechange) {
            this.fieldValueChange.next({ name: 'srfmajortext', value: val });
        }
    }

    /**
     * 获取srfmajortext值
     *
     * @type {*}
     * @memberof MainData
     */
    get srfmajortext(): any {
        return this._srfmajortext;
    }

    /**
     * 
     *
     * @private
     * @type {*}
     * @memberof MainData
     */
    private _srftempmode: any = null;

    /**
     * 设置srftempmode值
     *
     * @memberof MainData
     */
    set srftempmode(val: any) {
        const oldVal = this._srftempmode;
        this._srftempmode = val;
        if (!Object.is(oldVal, val) && !this.ignorefieldvaluechange) {
            this.fieldValueChange.next({ name: 'srftempmode', value: val });
        }
    }

    /**
     * 获取srftempmode值
     *
     * @type {*}
     * @memberof MainData
     */
    get srftempmode(): any {
        return this._srftempmode;
    }

    /**
     * 
     *
     * @private
     * @type {*}
     * @memberof MainData
     */
    private _srfuf: any = null;

    /**
     * 设置srfuf值
     *
     * @memberof MainData
     */
    set srfuf(val: any) {
        const oldVal = this._srfuf;
        this._srfuf = val;
        if (!Object.is(oldVal, val) && !this.ignorefieldvaluechange) {
            this.fieldValueChange.next({ name: 'srfuf', value: val });
        }
    }

    /**
     * 获取srfuf值
     *
     * @type {*}
     * @memberof MainData
     */
    get srfuf(): any {
        return this._srfuf;
    }

    /**
     * 
     *
     * @private
     * @type {*}
     * @memberof MainData
     */
    private _srfdeid: any = null;

    /**
     * 设置srfdeid值
     *
     * @memberof MainData
     */
    set srfdeid(val: any) {
        const oldVal = this._srfdeid;
        this._srfdeid = val;
        if (!Object.is(oldVal, val) && !this.ignorefieldvaluechange) {
            this.fieldValueChange.next({ name: 'srfdeid', value: val });
        }
    }

    /**
     * 获取srfdeid值
     *
     * @type {*}
     * @memberof MainData
     */
    get srfdeid(): any {
        return this._srfdeid;
    }

    /**
     * 
     *
     * @private
     * @type {*}
     * @memberof MainData
     */
    private _srfsourcekey: any = null;

    /**
     * 设置srfsourcekey值
     *
     * @memberof MainData
     */
    set srfsourcekey(val: any) {
        const oldVal = this._srfsourcekey;
        this._srfsourcekey = val;
        if (!Object.is(oldVal, val) && !this.ignorefieldvaluechange) {
            this.fieldValueChange.next({ name: 'srfsourcekey', value: val });
        }
    }

    /**
     * 获取srfsourcekey值
     *
     * @type {*}
     * @memberof MainData
     */
    get srfsourcekey(): any {
        return this._srfsourcekey;
    }

    /**
     * 用户角色
     *
     * @private
     * @type {*}
     * @memberof MainData
     */
    private _uesrrolename: any = null;

    /**
     * 设置uesrrolename值
     *
     * @memberof MainData
     */
    set uesrrolename(val: any) {
        const oldVal = this._uesrrolename;
        this._uesrrolename = val;
        if (!Object.is(oldVal, val) && !this.ignorefieldvaluechange) {
            this.fieldValueChange.next({ name: 'uesrrolename', value: val });
        }
    }

    /**
     * 获取uesrrolename值
     *
     * @type {*}
     * @memberof MainData
     */
    get uesrrolename(): any {
        return this._uesrrolename;
    }

    /**
     * 用户对象
     *
     * @private
     * @type {*}
     * @memberof MainData
     */
    private _userobjectname: any = null;

    /**
     * 设置userobjectname值
     *
     * @memberof MainData
     */
    set userobjectname(val: any) {
        const oldVal = this._userobjectname;
        this._userobjectname = val;
        if (!Object.is(oldVal, val) && !this.ignorefieldvaluechange) {
            this.fieldValueChange.next({ name: 'userobjectname', value: val });
        }
    }

    /**
     * 获取userobjectname值
     *
     * @type {*}
     * @memberof MainData
     */
    get userobjectname(): any {
        return this._userobjectname;
    }

    /**
     * 用户自定义
     *
     * @private
     * @type {*}
     * @memberof MainData
     */
    private _usertag: any = null;

    /**
     * 设置usertag值
     *
     * @memberof MainData
     */
    set usertag(val: any) {
        const oldVal = this._usertag;
        this._usertag = val;
        if (!Object.is(oldVal, val) && !this.ignorefieldvaluechange) {
            this.fieldValueChange.next({ name: 'usertag', value: val });
        }
    }

    /**
     * 获取usertag值
     *
     * @type {*}
     * @memberof MainData
     */
    get usertag(): any {
        return this._usertag;
    }

    /**
     * 用户对象
     *
     * @private
     * @type {*}
     * @memberof MainData
     */
    private _userobjectid: any = null;

    /**
     * 设置userobjectid值
     *
     * @memberof MainData
     */
    set userobjectid(val: any) {
        const oldVal = this._userobjectid;
        this._userobjectid = val;
        if (!Object.is(oldVal, val) && !this.ignorefieldvaluechange) {
            this.fieldValueChange.next({ name: 'userobjectid', value: val });
        }
    }

    /**
     * 获取userobjectid值
     *
     * @type {*}
     * @memberof MainData
     */
    get userobjectid(): any {
        return this._userobjectid;
    }

    /**
     * 用户角色成员标识
     *
     * @private
     * @type {*}
     * @memberof MainData
     */
    private _userroledetailid: any = null;

    /**
     * 设置userroledetailid值
     *
     * @memberof MainData
     */
    set userroledetailid(val: any) {
        const oldVal = this._userroledetailid;
        this._userroledetailid = val;
        if (!Object.is(oldVal, val) && !this.ignorefieldvaluechange) {
            this.fieldValueChange.next({ name: 'userroledetailid', value: val });
        }
    }

    /**
     * 获取userroledetailid值
     *
     * @type {*}
     * @memberof MainData
     */
    get userroledetailid(): any {
        return this._userroledetailid;
    }

    /**
     * 用户角色
     *
     * @private
     * @type {*}
     * @memberof MainData
     */
    private _userroleid: any = null;

    /**
     * 设置userroleid值
     *
     * @memberof MainData
     */
    set userroleid(val: any) {
        const oldVal = this._userroleid;
        this._userroleid = val;
        if (!Object.is(oldVal, val) && !this.ignorefieldvaluechange) {
            this.fieldValueChange.next({ name: 'userroleid', value: val });
        }
    }

    /**
     * 获取userroleid值
     *
     * @type {*}
     * @memberof MainData
     */
    get userroleid(): any {
        return this._userroleid;
    }

}